package com.lk.security.authentication.mobile;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @program: lk-security-parent
 * @description: 发送短信验证码，第三方的短信服务接口
 * @author: Aspirin
 * @create: 2020-05-30 21:41
 * @remarks @Component 不使用这种方式，专门写个配置类，做拓展 SecurityConfigBean
 */
public class SmsCodeSender implements SmsSend {
  private static final Logger logger = LoggerFactory.getLogger(SmsCodeSender.class);

  @Override
  public boolean sendSms(String mobile, String content) {
    String sendContent = String.format("lk,验证码%s,请勿泄露给别人。", content);
    // 调用真实的第三方发送功能sdk
    logger.info("向手机号：{}，发送的短信为：{}", mobile, sendContent);
    return true;
  }
}
